package schoolWork;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: tao
 * Date: 2023-11-17
 * Time: 16:16
 */
public class Test4 {
    public static void main(String[] args) {
        try {
            //int n = 5 / 0;
            int [] arr = new int[2];
            arr[3] = 10;
        } catch (ArithmeticException e) {
            e.printStackTrace();
            System.out.println("分母为0");
        } catch (ArrayIndexOutOfBoundsException e) {
            e.printStackTrace();
            System.out.println("数组越界");
        }
    }
}
